home *** CD-ROM | disk | FTP | other *** search
- EDITINFO.MOD
- by Adam Caldwell (The Emporer)
-
- ===========================================================================
- This is a mod that I made so that WWIVEdit 2.2 could ALWAYS get the correct
- title and destination when it loaded up. It also has the side effect of
- allowing Title changes and "Result" codes for Anonymous/Non-Anonymous saves.
-
- ***** This version will only work with WWIVEdit 2.3 and above *****
- Requires WWIV 4.20 or 4.21. If you have WWIV 4.12 still, get the EDITINFO.MOD
- from WWIVED22.ZIP.
-
- 1/18/92 I finally update the mod for WWIV 4.20 (now it won't work with
- WWIV 4.12)
-
- 4/3/92 Update for WWIV 4.21 (really no different) and added FEDIT
- compatibility and Delete key fix.
- ===========================================================================
- Step 1:
-
- Back everything up... This should go without saying by now...
- ===========================================================================
- Step 2:
-
- Load up VARS.H and make the following addition:
-
- char ansistr[81], cdir[81], charbuffer[161], chatreason[81], crttype,
- curspeed[81], dcd[81], dc[81], dszlog[81], endofline[81],
- gatfn[81], irt[81], net_email_name[81], newprompt[161], odc[81],
- search_pattern[81], ver_no1[51], xdate[9], irt_name[81];
-
- char message_title[81], message_dest[81]; /* Add Me */
- int in_fsed; /* Add Me */
-
- int abortext, already_on, ansiptr, arcling, async_irq, base, bchanged,
- change_color, charbufferpointer, chatcall, chatting, chat_file,
-
- =============================================================================
- Step 3:
-
- Still in VARS.H, but further down, make this addition:
-
- extern char ansistr[81], cdir[81], charbuffer[161], chatreason[81], crttype,
- curspeed[81], dcd[81], dc[81], dszlog[81], endofline[81],
- gatfn[81], irt[81], net_email_name[81], newprompt[161], odc[81],
- search_pattern[81], ver_no1[51], xdate[9], irt_name[81];
-
- extern char message_title[81], message_dest[81]; /* Add Me */
- extern int in_fsed; /* Add Me */
-
- extern int abortext, already_on, ansiptr, arcling, async_irq, base, bchanged,
- change_color, charbufferpointer, chatcall, chatting, chat_file,
- checkit, configfile, curatr, curdir, curdloads, curldir, curlsub,
-
-
- ===========================================================================
- Step 4:
-
- Save VARS.H and load up BBS.C.
- ===========================================================================
- Step 5:
-
- In BBS.C, in void text_edit() add these two lines:
-
- sprintf(s1,"@ Edited: %s",s);
- sysoplog(s1);
- if (okfsed()) { /* Add { at end of line */
- strcpy(message_title,s); /* Add Me */
- strcpy(message_dest,syscfg.gfilesdir); /* Add Me */
- external_edit(s,syscfg.gfilesdir,thisuser.defed-1,500);
- } else /* Add } at start of line*/
- tedit(s);
- ===========================================================================
- Step 6:
-
- Still in BBS.C in void mainmenu() add these two lines:
- if ((strcmp(s,"EDIT")==0) && (so())) {
- nl();
- prt(2,"Filename? ");
- input(s1,50);
- if (s1[0]) {
- if ((okansi()) && (thisuser.defed)) { /* Add { at end of line */
- strcpy(message_title,s1); /* Add Me */
- strcpy(message_dest,"BBS Main Directory"); /* Add Me */
- external_edit(s1,"",thisuser.defed-1,500);
- } else /* Add } in front */
- tedit(s1);
- ===========================================================================
- Step 7:
-
- Save BBS.C and load up MSGBASE.C
- ===========================================================================
- Step 8.A:
- /** This part is needed only if you HAVEN'T added the FEDIT mod in the **/
- /** documentation to FEDIT. **/
- /** The following is a modified version of the FEDIT mod by One Eyed Willy **/
-
- In MSGBASE.C, just above void inmsg() Add the following:
-
- typedef struct /* Add */
- { /* Add */
- char tlen, /* Add */
- ttl[81], /* Add */
- anon; /* Add */
- } infstruct; /* Add */
-
- Now add the following two lines (marked /*Add*/)
- char s[LEN],s1[LEN],s2[LEN],ro[81],fnx[81],chx,*ss,*ss1,pseudo[25];
- int maxli,curli,done,save,savel,i,i1,i2,i3,i4,i5,f,setanon,gati[50],gatp;
- messagerec m;
- long ll,l1;
- char *lin, *b;
- int real_name=0;
- FILE *stream; /* Add */
- infstruct fedit_data; /* Add */
-
- Further down, Search for the following code:
- pl("Aborted."); /* Existing Line */
- m.stored_as=0xffffffff; /* Existing Line */
- *m1=m; /* Existing Line */
- if (!fsed) /* Existing Line */
- farfree((void *)lin); /* Existing Line */
- return; /* Existing Line */
- } /* Existing Line */
-
- if (fsed) { /* Add */
- fedit_data.tlen=60; /* Add */
- strcpy(fedit_data.ttl,title); /* Add */
- fedit_data.anon=0; /* Add */
- stream=fopen("FEDIT.INF","wb"); /* Add */
- fwrite(&fedit_data,sizeof(infstruct),1,stream); /* Add */
- fclose(stream); /* Add */
- } /* Add */
-
- if (!fsed) { /* Existing Line */
- sprintf(s,"Enter message now, max %u lines.",maxli); /* Existing Line */
-
- Further Down,
- if (save) { /* Existing Line */
- pl("Reading in file..."); /* Existing Line */
- } /* Existing Line */
- use_workspace=0; /* Existing Line */
- } /* Existing Line */
- }
-
- if (fsed) { /* Add */
- stream=fopen("FEDIT.INF","rb"); /* Add */
- fread(&fedit_data,sizeof(infstruct),1,stream); /* Add */
- fclose(stream); /* Add */
- strcpy(title,fedit_data.ttl); /* Add */
- setanon=fedit_data.anon; /* Add */
- unlink("FEDIT.INF"); /* Add */
- } /* Add */
-
- if (save) { /* Existing Line */
- switch(*anony) { /* Existing Line */
- case 0: /* no anony */ /* Existing Line */
- *anony=0; /* Existing Line */
- break;
-
-
- Step 8.B: (This part is needed even if you do have the Fedit mod installed)
- Go back up now and make the following addition:
-
- if (okansi()) { /* Existing Line */
- prt(2,"Title: "); /* Existing Line */
- mpl(60); /* Existing Line */
- inputl(title,60); /* Existing Line */
- strcpy(message_title,title); /* Add Me */
- } else { /* Existing Line */
-
-
- ===========================================================================
- Step 9:
-
- In void email() about 100 lines further down... Add this line
-
- if (un==0) /* Existing Line */
- sprintf(s2,"%s @%u",net_email_name,sy); /* Existing Line */
- else /* Existing Line */
- sprintf(s2,"User %u @%u",un,sy); /* Existing Line */
- } /* Existing Line */
- npr("E-mailing %s\r\n",s2); /* Existing Line */
- strcpy(message_dest,s2); /* Add Me */
- if (ss.ability & ability_email_anony) /* Existing Line */
- i=anony_enable_anony; /* Existing Line */
- else /* Existing Line */
- i=0; /* Existing Line */
- if (anony & (anony_receiver_pp | anony_receiver_da)) /* Existing Line */
- ===========================================================================
- Step 10:
-
- Save MSGBASE.C and load MSGBASE1.C
- ===========================================================================
- Step 11:
-
- At the top just after the following lines:
- #define EMAIL_STORAGE 2 /* Existing line */
-
- int deleted_flag; /* Existing line */
-
- Add all of these lines:
-
- void create_editor_info()
- {
- FILE *f;
-
- remove("EDITOR.INF");
- remove("RESULT.ED");
- if ((f=fopen("EDITOR.INF","wt"))!=NULL) {
- fprintf(f,"%s\n%s\n%u\n%s\n%s\n%u\n",
- message_title,
- message_dest,
- usernum,
- thisuser.name,
- thisuser.realname,
- thisuser.sl);
- fclose(f);
- }
- }
- ===========================================================================
- Step 12:
-
- In void post() add the following line:
- if (syscfg.systemnumber) { /* Existing Line */
- nl(); /* Existing Line */
- pl("This post will go out on WWIVnet."); /* Existing Line */
- nl(); /* Existing Line */
- } /* Existing Line */
- } /* Existing Line */
- strcpy(message_dest,subboards[curlsub].name); /* Add me */
- inmsg(&m,p.title,&a,1,(subboards[curlsub].filename),ALLOW_FULLSCREEN); /* Existing Line */
- if (m.stored_as!=0xffffffff) { /* Existing Line */
- p.anony=a; /* Existing Line */
- ===========================================================================
- Step 13:
-
- In int external_edit() add this line:
- itoa(numlines,sx3,10); /* Existing Line */
- stuff_in(s,s1,fn,sx1,sx2,sx3,""); /* Existing Line */
- in_fsed=1; /* Add Me */
- create_editor_info(); /* Add Me */
- full_external(s,0,1); /* Existing Line */
- in_fsed=0; /* Add Me */
- if (!wfc) /* Existing Line */
- topscreen(); /* Existing Line */
- ===========================================================================
- Step 14:
-
- Save MSGBASE1.C and Load MULTMAIL.C
- ===========================================================================
- Step 15:
-
- In void multimail() add this line:
- m.msg.storage_type=EMAIL_STORAGE; /* Existing Line */
- strcpy(irt,"Multi-Mail"); /* Existing Line */
- irt_name[0]=0; /* Existing Line */
- strcpy(message_dest, irt); /* Add Me */
- inmsg(&m.msg,t,&i,1,"EMAIL",ALLOW_FULLSCREEN);/* Existing Line */
- if (m.msg.stored_as==0xffffffff) /* Existing Line */
- return; /* Existing Line */
- strcpy(m.title,t); /* Existing Line */
- ===========================================================================
- Step 16:
-
- Save MULTMAIL.C and load XINIT.C
- ===========================================================================
- Step 17:
-
- chat_file=0; /* Existing Line */
- in_fsed=0; /* Add Me */
- do_event=0; /* Existing Line */
- sysop_alert=0; /* Existing Line */
-
- ===========================================================================
- Step 18:
-
- Save XINIT.C and load COM.C
- ===========================================================================
-
- In skey1() make the following change:
- c = *ch; /* Existing Line */
- if (c == 127 && !in_fsed) /* Add "&& !in_fsed" */
- c = 8; /* Existing Line */
- if (okskey) /* Existing Line */
- switch(c) { /* Existing Line */
- case 1: /* Existing Line */
-
- ===========================================================================
-
- Disclaimer:
- I assume no responsibilty if this blows up your system.
-
- About this mod:
- This mod no longer will conflict with the FEdit mod as it has the Fedit
- mod incorporated into it.
- This mod has been successfully used on my BBS with my 254 Message base
- installed, as well as some other mods. If you have any problems with this
- mod, there are a bunch of ways that you can contact me:
-
- 1) E-Mail me via WWIVLink as 1 @16470
- 2) E-Mail me via WWIVNet as 1 @6470
- 3) E-Mail me via WWIVNet as 718 @5252
- 4) E-Mail me via Internet as acaldwel@oucsace.ohiou.edu
- Note: I can not respond to UUCP mail, nor am I guaranteed to get it.
- 5) E-Mail me via Bitnet as CS755@OUACCVMB
- 6) Call my BBS at 614-593-7836 [The First Galactic Empire]
- 7) Call me (only if you are *REALLY* desperate at 614-594-3051)
-